package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.RoleCamera;
import com.ruoyi.system.domain.vo.AreaCameraVo;
import com.ruoyi.system.domain.vo.SysMonitorCameraVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleCameraMapper extends BaseMapper<RoleCamera> {

    List<SysMonitorCameraVo> selectCameraListByIds(@Param("cameraIds") List<Long> cameraIds);

    void deleteByRoleId(@Param("roleId") Long roleId);

    void deleteFromByRoleIds(@Param("roleIds") List<Long> roleIds);

    void deleteByCameraIds(@Param("cameraIds") List<Long> cameraIds);

    List<AreaCameraVo> selectAllArea();

    List<AreaCameraVo> selectAreaCameraByIdList(@Param("cameraIds") List<Long> cameraIds);

    List<AreaCameraVo> selectAllCamera();

    List<Long> selectCameraIdListByRoleId(@Param("roleId") Long roleId);

    List<Long> selectCameraIdListByRoleIdList(@Param("roleIds") List<Long> roleIds);

    Integer selectCountByCameraId(@Param("cameraId") Long cameraId);

    Long queryAreaIdByName(@Param("areaName") String areaName, @Param("parentId")Long parentId);
}
